﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using Subtle.Domain.Models;

namespace Subtle.ViewModels
{
	/// <summary>
	/// Blog Configure View Model
	/// </summary>
	public class BlogConfigureViewModel
	{
		[Required]
		[Display(Name="Blog title")]
		public string Title { get; set; }

		[Required]
		[Display(Name = "What is this blog going to be about?")]
		public string Description { get; set; }

		[Required]
		[Display(Name = "What keywords will best describe this blog?")]
		public string Keywords { get; set; }

		/// <summary>
		/// The User ID
		/// </summary>
		public string UserID { get; set; }

		/// <summary>
		/// Get Blog Information
		/// </summary>
		/// <returns></returns>
		public Blog GetBlog()
		{
			var blog = new Blog();
			AutoMapper.Mapper.Map<BlogConfigureViewModel, Blog>(this, blog);
			return blog;
		}
	}
}